using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LaMianIndent
{
    public static int clientNumber = 0;

    public EClient clientType;

    public ERuanYingDu ruanYingDu;

    public EGaoTang gaoTang;

    public ETiaoWeiLiao tiaoWeiLiao;

    public ETiaoWeiDu tiaoWeiDu;

    public List<EPeiCai> peiCais;

    public LaMianIndent()
    {
        clientType = (EClient)Random.Range(1, System.Enum.GetValues(typeof(EClient)).Length);
        LaMianMgr.Instance.AddClientComeTimes(clientType);
        
        ruanYingDu = (ERuanYingDu)Random.Range(2, System.Enum.GetValues(typeof(ERuanYingDu)).Length);
        gaoTang = (EGaoTang)Random.Range(1, System.Enum.GetValues(typeof(EGaoTang)).Length);
        tiaoWeiLiao = (ETiaoWeiLiao)Random.Range(1, System.Enum.GetValues(typeof(ETiaoWeiLiao)).Length);
        tiaoWeiDu = (ETiaoWeiDu)Random.Range(1, System.Enum.GetValues(typeof(ETiaoWeiDu)).Length);
        peiCais = SuijiPeiCai();
    }

    private List<EPeiCai> SuijiPeiCai()
    {
        int num = Random.Range(1, 7);
        List<EPeiCai> peicais = new List<EPeiCai>();
        for (int i = 0; i < num; i++)
        {
            var data = (EPeiCai)Random.Range(1, System.Enum.GetValues(typeof(EPeiCai)).Length);
            peicais.Add(data);
        }
        return peicais;
    }
}
